from sqlalchemy import Column, CHAR, String, Integer, DateTime
from config.database import Base


class KhAttendance(Base):
    """
    考勤数据表表
    """

    __tablename__ = 'kh_attendance'

    id = Column(Integer, primary_key=True, autoincrement=True, nullable=False, comment='序号')
    user_id = Column(String(20), nullable=False, comment='用户编号')
    user_name = Column(String(50), nullable=False, comment='用户姓名')
    am_pm = Column(String(20), nullable=False, comment='考勤时段')
    kh_work = Column(String(20), nullable=False, comment='考勤类型')
    punch_date = Column(String(20), nullable=False, comment='打卡日期')
    punch_time = Column(String(20), nullable=False, comment='打卡时间')
    punch_result = Column(String(20), nullable=False, comment='考勤结果')
    del_flag = Column(CHAR(1), nullable=True, comment='删除标志')
    create_by = Column(String(64), nullable=True, comment='创建者')
    create_time = Column(DateTime, nullable=True, comment='创建时间')
    update_by = Column(String(64), nullable=True, comment='更新者')
    update_time = Column(DateTime, nullable=True, comment='更新时间')
    remark = Column(String(500), nullable=True, comment='备注')



